package listener;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;

public class AssigneeTaskListener implements TaskListener {
    public void notify(DelegateTask delegateTask) {
        if(delegateTask.getName().equals("部门经理审批")){
            delegateTask.setAssignee("赵六");
        }else if(delegateTask.getName().equals("人事复批")){
            delegateTask.setAssignee("孙七");
        }
    }
}